package com.auction.mapper;

import com.auction.common.dao.MyBaseMapper;
import com.auction.entity.UserAddr;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserAddrMapper extends MyBaseMapper<UserAddr> {
    /**
     * 根据用户id获取收货地址
     * @param user_id
     * @return
     */
    List<Map> getUserAddrByUserId(int user_id);

    /**
     * 改为默认地址
     * @param addr_id
     * @return
     */
    int updateDefault(int addr_id);

    /**
     * 改为非默认地址
     * @param addr_id
     * @return
     */
    int updateNoDefault(int addr_id);
}
